package com.smc.action.message;

import java.sql.Timestamp;

import com.smc.security.SecurityContextHolder;

/**
 * 
 * 类名：BaseMessageAction.java
 * 作用：
 * @author 陈恒 Jan 25, 2010 
 * @version 1.0
 */
public class BaseMessageAction extends AbstractMessageAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7133593352016405048L;
	
	private String receiverUuid ;
	
	public String getReceiverUuid() {
		return receiverUuid;
	}
	public void setReceiverUuid(String receiverUuid) {
		this.receiverUuid = receiverUuid;
	}

	public String compose() {
		Timestamp recordTime = new Timestamp(System.currentTimeMillis());
		this.message.setRecordTime(recordTime);
		this.message.setStatus(0);
		String senderUuid = (String) SecurityContextHolder.getAuthentication(request.getSession()).getUUUID();
		this.messageService.save_IG_IG_IG_message(receiverUuid, senderUuid, message);
		return SUCCESS ;
	}
	
}
